package com.ruoyi.cust.service.impl;

import java.util.List;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cust.mapper.CityShareMapper;
import com.ruoyi.cust.domain.CityShare;
import com.ruoyi.cust.service.ICityShareService;

/**
 * 分享项目Service业务层处理
 *
 * @author cjq
 * @date 2024-12-06
 */
@Service
public class CityShareServiceImpl implements ICityShareService {
    @Autowired
    private CityShareMapper cityShareMapper;

    /**
     * 查询分享项目
     *
     * @param shareId 分享项目主键
     * @return 分享项目
     */
    @Override
    public CityShare selectCityShareByShareId(Long shareId) {
        return cityShareMapper.selectCityShareByShareId(shareId);
    }

    /**
     * 查询分享项目列表
     *
     * @param cityShare 分享项目
     * @return 分享项目
     */
    @Override
    public List<CityShare> selectCityShareList(CityShare cityShare) {
        return cityShareMapper.selectCityShareList(cityShare);
    }

    /**
     * 新增分享项目
     *
     * @param cityShare 分享项目
     * @return 结果
     */
    @Override
    public int insertCityShare(CityShare cityShare) {
                cityShare.setCreateTime(DateUtils.getNowDate());
            return cityShareMapper.insertCityShare(cityShare);
    }

    /**
     * 修改分享项目
     *
     * @param cityShare 分享项目
     * @return 结果
     */
    @Override
    public int updateCityShare(CityShare cityShare) {
        return cityShareMapper.updateCityShare(cityShare);
    }

    /**
     * 批量删除分享项目
     *
     * @param shareIds 需要删除的分享项目主键
     * @return 结果
     */
    @Override
    public int deleteCityShareByShareIds(Long[] shareIds) {
        return cityShareMapper.deleteCityShareByShareIds(shareIds);
    }

    /**
     * 删除分享项目信息
     *
     * @param shareId 分享项目主键
     * @return 结果
     */
    @Override
    public int deleteCityShareByShareId(Long shareId) {
        return cityShareMapper.deleteCityShareByShareId(shareId);
    }
}
